<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="UTF-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
		<title>Z-Wave JS: In the browser?!</title>
		<link rel="stylesheet" href="style.css" />
		<script src="setimmediate.js"></script>
	</head>
	<body>
		<h1>Z-Wave JS: In the browser?!</h1>

		<div>
			<button id="connect">Connect</button>
			<span style="margin-left: 1rem;">Current application: </span>
			<span id="app">unknown</span>
		</div>

		<hr style="margin: 1em 0" />

		<div>
			<h2>Flash firmware</h2>
			<div id="flash_error" style="color: red"></div>
			<input type="file" id="file" accept=".gbl,.zip" disabled />
			<button id="flash" disabled>Flash</button><br />
			<progress
				id="progress"
				value="0"
				max="100"
				style="display: none"
			></progress>
		</div>

		<hr style="margin: 1em 0" />

		<div>
			<h2>Controls</h2>
			<button id="run_application" disabled>Run Application</button> 
			<button id="bootloader" disabled>Enter Bootloader</button>
			<button id="bootloader_hw" disabled>HW Reset to Bootloader</button>
			<button id="erase_nvm" disabled>Erase NVM</button> 
			<button id="get_dsk" disabled>Get DSK</button> 
			<button id="get_region" disabled>Get Region</button> 
		</div>

		<div>
			<h2>LED Control</h2>
			<input type="number" disabled min="0" max="255" id="led_red" value="0" />
			<input type="number" disabled min="0" max="255" id="led_green" value="0" />
			<input type="number" disabled min="0" max="255" id="led_blue" value="0" />
			<button id="set_led" disabled>Set LED</button>
		</div>

		<div>
			<h2>System Indication</h2>
			<select id="system_indication" disabled>
				<option value="0" selected>none</option>
				<option value="1">warning</option>
				<option value="2">error</option>
			</select>
			<button id="set_system_indication" disabled>OK</button>
		</div>

		<script type="module" src="build/flasher.js"></script>
	</body>
</html>
